home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 7
/
Amoszine 7 (Disk 3 of 3).adf
/
ARCHIVES
/
AJC_More_Source.lha
/
AJC-Artistix-Ancient.AMOS
/
AJC-Artistix-Ancient.amosSourceCode
next >
Wrap
AMOS Source Code
|
1995-06-01
|
27KB
|
1,153 lines
'
' ARTISTIX v1.0
' By Andrew Campbell a long time ago!
'
' This program is ANCIENT but it's the first ever art program
' I tried to code. There's some interesting routines that could
' make potentially good rip-outs in here, so I've left it as it
' is - in it's original incarnation.
'
' Please note only the first THREE menus actually WORK (** not **
' including ZOOM!) - any others may cock the program up and require
' a control/C.
'
' Ps. DO NOT laugh at the titlescreen!
' I was at SCHOOL when I did this!! >8^)
'
Dim M$(5),PAL(31)
Global M$(),SL,M,X,Y,XY,YX,MZ,OPT,MEN,ZSET,C,DR,DM,GO,GW,MST,OPT,R,G,B,R$,A1$,A2$,A3$
Global A$,B$,OK,NO,BW,BR1,BR2,NOCOLS,FU,CURBRUSH,SP,STA,FIN,CLR,CURC,P,PAL
Global PAL(),TEMP,LIMIT,TD
'=========
' * INIT *
'=========
Auto View Off
Screen Open 0,320,256,16,Lowres
Curs Off : Flash Off : Cls 0
Unpack 11 To 0
Auto View On : View
Repeat : Until Mouse Key
SL=%1111111111111111
BW=0 : BR1=5 : BR2=5 : SP=0
NOCOLS=16 : CURBRUSH=1
STA=1 : FIN=NOCOLS-1
CURC=1 : PAL=1 : TD=0
Restore 555 :
For I=0 To 31 : Read A : PAL(I)=A : Next I
555 Data 0,$FFF,$EEE,$DDD,$CCC,$BBB,$AAA,$999,$888,$777,$666,$555,$444,$333,$222,$111,$FF,$FE,$FD,$FC,$FB,$FA,$F9,$F8,$F7,$F6,$F5,$F4,$F3,$F2,$F1,$F0
Cls 0
Auto View Off
Screen Open 7,320,256,16,Lowres
Curs Off : Flash Off : Cls 0
Screen Hide 7
Screen Open 2,320,256,16,Lowres
Curs Off : Flash Off : Cls 0
Unpack 10 To 2
Screen Open 1,320,40,16,Lowres
Curs Off : Flash Off
Screen Copy 2,0,0,320,40 To 1,0,0 : Screen 1 : Screen Hide 2
Screen 1 : Get Palette 2
Screen 0 :
For I=0 To 31 : Colour I,PAL(I) : Next I
Screen 7
For I=0 To 31 : Colour I,PAL(I) : Next I
Screen 1 : Get Palette 2
MEN=1
Screen 1
ZSET
C=5
Auto View On : View
'=====
PICK:
'=====
Change Mouse 1
Clear Key
Do
X=X Mouse : Y=Y Mouse
XY=Mouse Screen : MZ=Mouse Zone
If Mouse Key and MZ>0 Then Ink C : GZONE : ZSET : Screen 1
If Mouse Key and MZ=0 Then Repeat : Y=Y Mouse : Gosub LIMITS : Screen Display 1,132,Y,, : Until Mouse Key=0
If XY=0 and MEN>1 Then Screen To Back 1 : Screen 0 : Goto ART
Loop
'======
ART:
'======
Change Mouse 4
If OPT=13 and MEN=2 Then Change Mouse 6
If OPT=14 and MEN=2 Then Change Mouse 7
If OPT>15 and OPT<19 Then POSITION
Do
K$=""
K$=Inkey$
If K$="u" Then Screen Copy 7,0,0,320,256 To 0,0,0 : Clear Key
X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
If Mouse Key=1 Then GART
If Mouse Key=2 : Bob Off : Wait Vbl
Gosub LIMITS
Screen Copy 0,0,0,320,256 To 7,0,0 : Screen 7 : Get Palette 0 : Screen 0
Screen Display 1,132,Y-20,, : CMENU : Screen To Back 1 : Screen 0
If MST=1 : MST=0 : NEWMEN : ZSET : Goto PICK : End If
Goto ART
End If
Loop
LIMITS:
If Y<41 Then Y=41
If Y>250 Then Y=250
Return
'------------------ DRAW MENU OPTIONS
Procedure PLT
Set Line SL
X2=X Screen(X Mouse) : Y2=Y Screen(Y Mouse)
Gr Locate X2,Y2
Ink C
While Mouse Key
X2=X Screen(X Mouse) : Y2=Y Screen(Y Mouse)
If DM=1 Then Draw To X2,Y2
If DM=2 Then Plot X2,Y2,C
Wend
End Proc
Procedure BRUSH
POSITION
If CLR=1
Inc CURC
If CURC=FIN : CURC=STA : End If
C=CURC
End If
Ink C
If DR=1 Then Circle X,Y,BR2
If DR=2 Then Box X-BR1,Y-BR1 To X+BR1,Y+BR1
If DR=3 Then Bar X-BR1,Y-BR1 To X+BR1,Y+BR1
End Proc
Procedure ER
POSITION
While Mouse Key
X2=X Screen(X Mouse) : Y2=Y Screen(Y Mouse)
Ink C : Bar X2,Y2 To X2+10,Y2+14
Wend
End Proc
Procedure LINE
Set Line %1111111111111111
Gr Writing 2
POSITION
While Mouse Key
X2=X Screen(X Mouse) : Y2=Y Screen(Y Mouse)
Draw X,Y To X2,Y2 : Draw X,Y To X2,Y2
Wend
Gr Writing 0 :
Ink C : Set Line SL
Draw X,Y To X2,Y2
End Proc
Procedure TRIANGLE
Set Line %1111111111111111
Gr Writing 2
POSITION
Repeat : Until Mouse Key=0
While Mouse Key=0
X2=X Screen(X Mouse) : Y2=Y Screen(Y Mouse)
Draw X,Y To X2,Y2 : Draw X,Y To X2,Y2
Wend
Wait 2
Repeat : Until Mouse Key=0
While Mouse Key=0
X5=X Screen(X Mouse) : Y5=Y Screen(Y Mouse)
Draw X,Y To X2,Y2 : Draw X,Y To X2,Y2
Draw X,Y To X5,Y5 : Draw X,Y To X5,Y5
Draw X2,Y2 To X5,Y5 : Draw X2,Y2 To X5,Y5
If Mouse Key=2 Then Gr Writing 0 : Pop Proc
Wend
Gr Writing 0 : Ink C
Set Line SL
Polygon X,Y To X2,Y2 To X5,Y5
Wait 6
End Proc
Procedure POLY
Shared X,Y
POSITION
AG:
Gr Writing 2
Repeat : Until Mouse Key=0
While Mouse Key=0
X2=X Screen(X Mouse) : Y2=Y Screen(Y Mouse)
Draw X,Y To X2,Y2 : Draw X,Y To X2,Y2
Wend
If Mouse Key=2 Then Gr Writing 0 : Pop Proc
If Mouse Key=1 :
Gr Writing GW : Ink C : Draw X,Y To X2,Y2
X=X Screen(X Mouse)
Y=Y Screen(Y Mouse)
Goto AG
End If
End Proc
Procedure RAYS
Set Line SL
POSITION
Ink C
If Mouse Key=2 Then Pop Proc
While Mouse Key
X2=X Screen(X Mouse) : Y2=Y Screen(Y Mouse)
If CLR=1
Inc CURC
If CURC=FIN : CURC=STA : End If
Ink CURC
End If
Draw X,Y To X2,Y2
Wend
End Proc
Procedure SIRCLE
Shared X,Y
Gr Writing 2
POSITION
While Mouse Key
X2=X Screen(X Mouse) : Y2=Y Screen(Y Mouse)
R1=Abs(X-X2)/2 : R2=Abs(Y-Y2) : R4=Abs(Y-Y2)/2
R5=Abs(X-X2) : R=Max(R1,R2) : R3=Max(R4,R5)
If R<1 Then R=1
If R3<1 Then R3=1
If DM=1 : Circle X,Y,R : Circle X,Y,R : End If
If DM=2 : Ellipse X,Y,R,R3 : Ellipse X,Y,R,R3 : End If
Wend
Gr Writing GW : Ink C
If DM=1 Then Circle X,Y,R
If DM=2 Then Ellipse X,Y,R,R3
End Proc
Procedure RECTANGLE
Set Line %1111111111111111
Gr Writing 2
POSITION
While Mouse Key
X2=X Screen(X Mouse) : Y2=Y Screen(Y Mouse)
Box X,Y To X2,Y2 : Box X,Y To X2,Y2
Wend
Gr Writing GW : Ink C
Set Line SL
If DM=1 Then Box X,Y To X2,Y2
If DM=2
If X2=X or Y2=Y : Pop Proc : End If
If X2<X : Swap X2,X : End If
If Y2<Y : Swap Y2,Y : End If
Bar X,Y To X2,Y2
End If
End Proc
Procedure GRAB
SAD:
Set Line %1111111111111111
DR=1
POSITION
Gr Writing 2
FU=Point(X,Y)
While Mouse Key
X2=X Screen(X Mouse) : Y2=Y Screen(Y Mouse)
Box X,Y To X2,Y2 : Box X,Y To X2,Y2
Wend
Gr Writing GW
If X2=X or Y2=Y : Pop Proc : End If
If X2<X : Swap X2,X : End If
If Y2<Y : Swap Y2,Y : End If
If X2>318 or Y2>254 or X2<0 or Y2<0 or X<0 or Y<0 or X>318 or Y>254 Then Boom : Goto SAD
If FU=-1 Then FU=0
Plot X,Y,FU
Wait Vbl
Get Bob 50,X,Y To X2+1,Y2+1
Make Mask 50
DR=1 : PBOB
End Proc
Procedure PBOB
If DR=1 Then Hide On
SAC:
Repeat
K$=""
K$=Inkey$
If K$="u" Then Bob Off 1 : Wait Vbl : Screen Copy 7,0,0,320,256 To 0,0,0 : Clear Key
X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
If DR=1 Then Bob 1,X,Y,50 : Wait Vbl
If DR=5 Then Bob 1,X,Y,CURBRUSH+8 : Wait Vbl
Until Mouse Key
If Mouse Key=1 :
Bob Off 1 : Wait Vbl :
If DR=1 : Paste Bob X,Y,50 : Goto SAC : End If
If DR=2 : Paste Bob X,Y,Hrev(50) : Goto SAC : End If
If DR=3 : Paste Bob X,Y,Vrev(50) : Goto SAC : End If
If DR=4 : Paste Bob X,Y,Rev(50) : Goto SAC : End If
If DR=5 : Paste Bob X,Y,CURBRUSH+8 : Goto SAC : End If
Bob Off : Wait Vbl
End If
Show On
End Proc
Procedure PHILL
Change Mouse 6
Repeat
X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
Until X>0 and X<320 and Y>0 and Y<256 and Mouse Key
Ink C : Change Mouse 5 : Paint X,Y : Change Mouse 6
End Proc
Procedure POSITION
Repeat
K$=""
K$=Inkey$
If K$="u" Then Screen Copy 7,0,0,320,256 To 0,0,0 : Clear Key
X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
If OPT>15 and OPT<19 and MEN=2 : Bob 1,X,Y,50 : Wait Vbl : End If
If OPT=3 and MEN=3 : Bob 1,X,Y,CURBRUSH+8 : Wait Vbl : End If
Until Mouse Key
End Proc
'------------------ ZONE / SCREEN COPYS
Procedure ZSET
Reserve Zone 45
Reset Zone
If MEN=1
For I=0 To 9
Set Zone I+1,32*I,8 To(32*I)+32,39
Next I
End If
If MEN=2 : Rem ** SET FIRST TWELVE 16*16 Boxes!
For I=0 To 6
Set Zone I+1,16*I,8 To(16*I)+16,24
Next I
For I=0 To 6
Set Zone I+7,16*I,16 To(16*I)+16,39
Next I
Set Zone 13,16*6,8 To(16*6)+32,39
Set Zone 14,(16*6)+32,8 To(16*8)+32,39
For I=0 To 3
Set Zone I+15,16*I+160,8 To(16*I+160)+16,24
Next I
For I=0 To 3
Set Zone I+19,16*I+160,24 To(16*I+160)+16,39
Next I
Set Zone 23,224,8 To 224+32,39
Set Zone 24,256,8 To 256+32,39
Set Zone 25,288,8 To 288+31,39
End If
If MEN=3
Set Zone 1,0,8 To 64,39
Set Zone 2,64,8 To 128,39
For I=3 To 8
Set Zone I,(32*I)+32,8 To(32*I)+64,39
Next I
End If
If MEN=5
Set Zone 1,0,8 To 64,39
Set Zone 2,64,8 To 64+16,24
Set Zone 3,80,8 To 96,24
Set Zone 21,64,24 To 96,39
For I=4 To 6
Set Zone I,32*I-32,8 To 32*I,39
Next I
For I=0 To 6
Set Zone I+7,192+(16*I)-16,8 To 192+(16*I),24
Next I
For I=0 To 6
Set Zone I+14,192+(16*I)-16,16 To 192+(16*I),39
Next I
Set Zone 25,288,8 To 288+31,39
End If
End Proc
Procedure GZONE
MZ=Mouse Zone
If MZ<1 Then Pop Proc
'================ MAIN MENU
If MEN=1
If MZ=1 : MEN=2 : MZ=0 : ZSET : NEWMEN : End If
If MZ=2 : MEN=3 : MZ=0 : ZSET : NEWMEN : End If
If MZ=4 : MEN=5 : MZ=0 : ZSET : NEWMEN : End If
If MZ=5 : MEN=6 : MZ=0 : ZSET : NEWMEN : End If
If MZ=10 and Mouse Key=2
A$=" " : B$="QUIT : ARE YOU SURE?"
OKCANCEL
If OK=1 : Fade 2 : Wait 30 : End : End If
End If
End If
'=============== DRAW MENU
If MEN=2
If MZ=9 and Mouse Key=2 : DR=1
BRUSHES
End If
If MZ=10 and Mouse Key=2 : DR=2
BRUSHES
End If
If MZ=12 : Screen 0 : Set Paint 0 : Bell : Pop Proc : End If
If MZ=11 : Screen 0 : Set Paint 1 : Bell : Pop Proc : End If
If MZ=21 : Make Mask 50 : Bell : Pop Proc : End If
If MZ=20 : No Mask 50 : Bell : Pop Proc : End If
If MZ=24
CULPIC
If OK=1
Screen 0 : Cls C : Screen 1 :
Pop Proc
End If
End If
If MZ=25 : MEN=1 : NEWMEN : ZSET : Pop Proc : End If
OPT=MZ
End If
'================= TOOLS MENU
If MEN=3
If MZ=1 : LINESTYLE : End If
If MZ=2 : BRUSHED : End If
If MZ=6 : XY : End If
If MZ=4 : DR=1 : SLIDE : End If
If MZ=5 : DR=2 : SLIDE : End If
If MZ=8 : MEN=1 : NEWMEN : ZSET : Pop Proc : End If
OPT=MZ
End If
'================= SHADE MENU
If MEN=5
If MZ=1 : SHADER : Pop Proc : End If
If MZ=25 : MEN=1 : NEWMEN : ZSET : Pop Proc : End If
If MZ=21 : Screen 0 : Shift Off : Get Palette 7 : Screen 1 : Pop Proc : End If
If MZ=2 : DR=1 : SHFT : Pop Proc : End If
If MZ=3 : DR=2 : SHFT : Pop Proc : End If
If MZ=5 : CULPIC : DR=1 :
If OK=1 : RFILL : End If
Pop Proc
End If
If MZ=6 : CULPIC : DR=2
If OK=1 : RFILL : End If
End If
If MZ=13 : A$=" TONE DOWN VALUE" : B$="COLS DOWN:" : TEMP=TD : LIMIT=14 : NUMBERS : TD=TEMP : End If
If MZ=15 and Mouse Key=2 : DR=2 : BRUSHES : End If
If MZ=16 and Mouse Key=2 : DR=1 : BRUSHES : End If
If MZ=17 and Mouse Key=2 : DR=3 : BRUSHES : End If
If MZ=20
A$=" " : B$="MIRROR (RIGHT) : ARE YOU SURE?"
OKCANCEL
If OK=1
Screen Hide 1 : Screen 0
For I=0 To 160 : For J=0 To 255
PX=Point(I,J)
PX=PX-TD
If PX<0 : PX=0 : End If
Plot 319-I,J,PX
If Mouse Key=2 : MEN=5 : NEWMEN : ZSET : Pop Proc : End If
Next J : Next I
End If
MEN=5 : NEWMEN : ZSET : Pop Proc
End If
If MZ=19
A$=" " : B$="PERFORM REFLECTION : ARE YOU SURE?" : OKCANCEL
If OK=1
Screen Hide 1 : Screen 0
For I=0 To 319 : For J=0 To 127
PX=Point(I,J)
PX=PX-TD
If PX<0 : PX=0 : End If
Plot I,256-J,PX
If Mouse Key=2 : MEN=5 : NEWMEN : ZSET : Pop Proc : End If
Next J : Next I
End If : MEN=5 : NEWMEN : ZSET : Pop Proc
End If
OPT=MZ
End If
End Proc
Procedure GART
If MEN=2
If OPT=1 : DM=1 : PLT : End If
If OPT=2 : DM=2 : PLT : End If
If OPT=7 : LINE : End If
If OPT=8 : POLY : End If
If OPT=3 : DM=1 : SIRCLE : End If
If OPT=4 : DM=2 : SIRCLE : End If
If OPT=5 : DM=1 : RECTANGLE : End If
If OPT=6 : DM=2 : RECTANGLE : End If
If OPT=13 : PHILL : End If
If OPT=14 : ER : End If
If OPT=15 : RAYS : End If
If OPT=16 : DR=3 : PBOB : End If
If OPT=17 : DR=2 : PBOB : End If
If OPT=18 : DR=1 : PBOB : End If
If OPT=22 : DR=4 : PBOB : End If
If OPT=9 : DR=2 : BRUSH : End If
If OPT=10 : DR=1 : BRUSH : End If
If OPT=19 : TRIANGLE : End If
If OPT=23 : GRAB : End If
End If
If MEN=3
If OPT=7 : KLIP : End If
If OPT=3 : DR=5 : PBOB : End If
End If
If MEN=5
If OPT=15 : DR=1 : CLR=1 : BRUSH : End If
If OPT=16 : DR=2 : CLR=1 : BRUSH : End If
If OPT=17 : DR=3 : CLR=1 : BRUSH : End If
If OPT=18 : CLR=1 : RAYS : End If
End If
End Proc
Procedure NEWMEN
Auto View Off
Screen Open 1,320,40,16,Lowres
Y=Y Mouse
If Y<71 Then Y=71
If Y>280 Then Y=280
Screen Display 1,132,Y-20,,
Curs Off : Flash Off
Screen To Front 1
Get Palette 2
Auto View On : View
If MEN=1 or MEN=2 or MEN=3
Screen Copy 2,0,40*(MEN-1),320,40*MEN To 1,0,0
End If
If MEN>4
Screen Copy 2,0,40*(MEN-2),320,40*(MEN-1) To 1,0,0
End If
Screen 1
End Proc
'------------------ POP UP COLOUR MENUS
Procedure CMENU
'
Screen Open 1,320,75,16,Lowres
Y=Y Mouse
If Y<75 Then Y=75
If Y>250 Then Y=250
Screen Display 1,132,Y-30,,
Curs Off : Flash Off
Change Mouse 4
Screen 1
REO:
Palette 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Cls BW
Reserve Zone 45
Paper BW
If BW=0 Then Pen 1
If BW=1 Then Pen 0
NOCOLS=16
For I=0 To NOCOLS-1 :
Ink I : Bar I*8,0 To I*8+8,16
Ink 0 : Box I*8,0 To I*8+8,16
Set Zone I+1,I*8,0 To I*8+8,16
Next I
Set Zone 35,0,3*8 To 8,4*8
Set Zone 36,0,4*8 To 8,5*8
Set Zone 37,0,5*8 To 8,6*8
Set Zone 38,16,3*8 To 24,4*8
Set Zone 39,16,4*8 To 24,5*8
Set Zone 40,16,5*8 To 24,6*8
Locate 30,3 : Print "[ OK ]"
Set Zone 41,30*8,3*8 To(40*8)+(8*10),4*8
Locate 30,4 : Print "[ MENU ]"
Set Zone 42,30*8,4*8 To(40*8)+(8*10),5*8
Locate 30,5 : Print "[ COL 0 ]"
Set Zone 43,30*8,5*8 To(40*8)+(8*10),6*8
Locate 30,6 : Print "[ COL 1 ]"
Set Zone 44,30*8,6*8 To(40*8)+(8*10),7*8
'SET UP COLOUR BOX
If BW=0 Then Ink 1
If BW=1 Then Ink 0
Box 179,(3*8)-1 To 231,(8*8)+1
Set Zone 45,180,3*8 To 230,8*8
OK:
Ink 1 : Box C*8,0 To C*8+8,16
Screen 1 : Fade 1 To 0 : Wait 15
Ink C
R$=Hex$(Colour(C),3)
A1$=Mid$(R$,2,1) : Gosub GT : R=Val(A1$)
A1$=Mid$(R$,3,1) : Gosub GT : G=Val(A1$)
A1$=Mid$(R$,4,1) : Gosub GT : B=Val(A1$)
Gosub CT
Do
Ink C
K$=Inkey$
MZ=Mouse Zone
ST:
If MZ>0 and MZ<33 and Mouse Key=1 or CHUM=1
CHUM=0
Ink 0 : Box C*8,0 To C*8+8,16
Ink MZ : C=MZ-1
Ink 1 : Box C*8,0 To C*8+8,16
Ink C
R$=Hex$(Colour(C),3)
A1$=Mid$(R$,2,1) : Gosub GT : R=Val(A1$)
A1$=Mid$(R$,3,1) : Gosub GT : G=Val(A1$)
A1$=Mid$(R$,4,1) : Gosub GT : B=Val(A1$)
Screen 0 : Colour C,R*256+G*16+B : Wait Vbl : Screen 1
Gosub CT
End If
If MZ>34 and MZ<41 and Mouse Key=1
If MZ=35 : Inc R : End If
If MZ=38 : Dec R : End If
If MZ=36 : Inc G : End If
If MZ=39 : Dec G : End If
If MZ=37 : Inc B : End If
If MZ=40 : Dec B : End If
Gosub CT
Colour C,R*256+G*16+B
Screen 0 : Colour C,R*256+G*16+B : Wait Vbl : Screen 1
Wait 1
End If
XV=X Mouse : YV=Y Mouse
MSC=Mouse Screen
If MSC=0 Then MST=0 : Screen 0 : Get Palette 1 : Screen 1 : Pop Proc
If Mouse Key=2 Then MST=1 : Screen 0 : Get Palette 1 : Screen 1 : Pop Proc
If MZ=41 and Mouse Key=1 Then Screen 0 : Get Palette 1 : Screen 1 : Pop Proc
If MZ=42 and Mouse Key=1 Then MST=1 : Screen 0 : Get Palette 1 : Screen 1 : Pop Proc
If MZ=43 and Mouse Key=1 Then BW=0 : Goto REO
If MZ=44 and Mouse Key=1 Then BW=1 : Goto REO
Gosub CT
Loop
GT:
If A1$="A" Then A1$="10"
If A1$="B" Then A1$="11"
If A1$="C" Then A1$="12"
If A1$="D" Then A1$="13"
If A1$="E" Then A1$="14"
If A1$="F" Then A1$="15"
Return
CT:
If R<0 Then R=0
If R>15 Then R=15
If G<0 Then G=0
If G>15 Then G=15
If B<0 Then B=0
If B>15 Then B=15
Locate 0,3 : Print "+ - R:";R;" "
Locate 0,4 : Print "+ - G:";G;" "
Locate 0,5 : Print "+ - B:";B;" "
Locate 0,7 : Print "HEX :";Hex$(Colour(C));" "
Locate 10,3 : Print "COLOUR:";C;" "
Ink 1 : Box 99,39 To 131,61
Ink C : Bar 100,40 To 130,60
Return
End Proc
'------------------ REQUESTOR ROUTINES
Procedure OKCANCEL
Z=$FFF
Fade 1,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z
Wait 15
Cls 1 : Reset Zone
Paper 1
Pen 0
Locate 0,0 : Centre A$
Locate 0,1 : Centre B$
Paste Bob 130,20,5 : Paste Bob 162,20,6
Set Zone 1,130,20 To 162,20+16
Set Zone 2,162,20 To 162+32,20+16
Fade 1 To 2 : Wait Vbl
Repeat
MZ=Mouse Zone
Until Mouse Key=1 and MZ>0
If MZ=1 Then OK=1 : NO=0
If MZ=2 Then NO=1 : OK=0
Fade 1 : Wait 15 : NEWMEN : ZSET
End Proc
Procedure BRUSHES
Z=$FFF : Fade 1,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z : Wait 15
Cls 1 : Reset Zone : Paper 1 : Pen 0
Locate 0,1 : Print " BRUSH SCALE"
Paste Bob 230,20,5
Set Zone 1,230,20 To 262,20+16
Paste Bob 8,20,7 : Paste Bob 8+32,20,8
Set Zone 3,8,20 To 8+32,20+16
Set Zone 4,8+32,20 To 8+64,20+16
Fade 1 To 2 : Wait Vbl
RDRAW:
Ink 0
If DR=2 Then Circle 150,20,BR2
If DR=1 Then Box 150-BR1,20-BR1 To 150+BR1,20+BR1
If DR=3 Then Bar 150-BR1,20-BR1 To 150+BR1,20+BR1
Repeat
MZ=Mouse Zone
If DR=1 or DR=3 Then Locate 23,3 : Print BR1;" "
If DR=2 Then Locate 23,3 : Print BR2;" "
Until Mouse Key=1 and MZ>0
If MZ=1 Then Fade 1 : Wait 15 : NEWMEN : ZSET : Ink C : Pop Proc
Ink 1
If DR=2 Then Circle 150,20,BR2
If DR=1 Then Box 150-BR1,20-BR1 To 150+BR1,20+BR1
If DR=3 Then Bar 150-BR1,20-BR1 To 150+BR1,20+BR1
If MZ=3 and DR=1 or MZ=3 and DR=3 Then Inc BR1
If MZ=3 and DR=2 Then Inc BR2
If MZ=4 and DR=1 or MZ=4 and DR=3 Then Dec BR1
If MZ=4 and DR=2 Then Dec BR2
If BR1>18 Then BR1=18
If BR1<1 Then BR1=1
If BR2>18 Then BR2=18
If BR2<1 Then BR2=1
Wait 1
Goto RDRAW
End Proc
Procedure CULPIC
PIC=0
Z=$FFF : Fade 1,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z : Wait 15
ROFF:
Cls 1 : Reset Zone
Paper 1 : Pen 0
Locate 0,1 : Centre "COLOUR SELECT:"
For I=1 To NOCOLS-1
Ink I-1 : Bar I*8,16 To I*8+8,32
Ink 0 : Box I*8,16 To I*8+8,32
Set Zone I,I*8,16 To I*8+8,32
Next I
Paste Bob 270,4,5 : Paste Bob 270,4+16,6
Set Zone 35,270,4 To 270+32,4+16
Set Zone 36,270,4 To 270+32,4+32
Fade 1 To 0 : Wait Vbl
BOV:
Repeat
MZ=Mouse Zone
Until Mouse Key=1
MS=Mouse Screen
If MS=0 and Mouse Key=1
Screen 0 :
X=X Screen(X Mouse)
Y=Y Screen(Y Mouse)
P=Point(X,Y)
If P=-1 : P=0 : End If
Screen 1 : MZ=P+1
End If
If MZ>0 and MZ<35
PIC=1
Ink 0 : Box(C*8)+8,16 To(C*8)+16,32
Ink MZ : C=MZ-1
Ink 1 : Box(C*8)+8,16 To(C*8)+16,32
Ink C
Goto BOV
End If
If MZ=35 and PIC=1 Then OK=1 : NO=0
If MZ=35 and PIC=0 Then Boom : Cls 1 : Locate 0,2 : Centre "YOU MUST PICK A COLOUR FIRST!!" : Repeat : Until Mouse Key=0 : Repeat : Until Mouse Key=1 : Goto ROFF
If MZ=36 Then NO=1 : OK=0
If MZ=0 Then Goto BOV
Fade 1 : Wait 15 : NEWMEN : ZSET
End Proc
Procedure NUMBERS
Z=$FFF : Fade 1,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z : Wait 15
Cls 1 : Reset Zone : Paper 1 : Pen 0 : Locate 0,1 : Print A$
Paste Bob 230,20,5 : Set Zone 1,230,20 To 262,20+16
Paste Bob 8,20,7 : Paste Bob 8+32,20,8
Set Zone 3,8,20 To 8+32,20+16 : Set Zone 4,8+32,20 To 8+64,20+16
Fade 1 To 2 : Wait Vbl
GS:
Repeat
MZ=Mouse Zone
Locate 14,3 : Print B$;TEMP;" "
Until Mouse Key=1 and MZ>0
If MZ=1 Then Fade 1 : Wait 15 : NEWMEN : ZSET : Ink C : Pop Proc
If MZ=3 Then Inc TEMP
If MZ=4 Then Dec TEMP
If TEMP<0 Then TEMP=0
If TEMP>LIMIT Then TEMP=LIMIT
Wait 3
Goto GS
End Proc
'------------------- TOOLS MENU
Procedure KLIP
Gr Writing 2
POSITION
Clip
While Mouse Key
X2=X Screen(X Mouse) : Y2=Y Screen(Y Mouse)
Box X,Y To X2,Y2 : Box X,Y To X2,Y2
Wend
If X2=X or Y2=Y : Pop Proc : End If
If X2<X : Swap X2,X : End If
If Y2<Y : Swap Y2,Y : End If
Gr Writing GW
Clip X,Y To X2,Y2
End Proc
Procedure SLIDE
Screen 0
If DR=1 Then Def Scroll 1,0,0 To 320,256,0,-1
If DR=2 Then Def Scroll 1,0,0 To 320,256,-1,0
If DR=1
Scroll 1 : Wait Vbl : Screen Copy 0,0,0,320,1 To 0,0,255
Pop Proc
End If
If DR=2
Scroll 1 : Wait Vbl : Screen Copy 0,0,0,1,256 To 0,319,0
Pop Proc
End If
End Proc
Procedure LINESTYLE
Z=$FFF : Fade 1,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z : Wait 15
ROFF:
Cls 1 : Reset Zone : Paper 1 : Pen 0
Locate 0,1 : Centre "LINE STYLE EDITOR"
Paste Bob 270,4,5 : Set Zone 35,270,4 To 270+32,4+16
Fade 1 To 2 : Wait Vbl
BEL:
For I=2 To 16
A$=Bin$(SL)
V$=Mid$(A$,I+1,1)
If V$="0" Then Ink 7 : Bar I*8,16 To I*8+8,32
If V$="1" Then Ink 0 : Bar I*8,16 To I*8+8,32
Set Line %1111111111111111
Ink 0 : Box I*8,16 To I*8+8,32
Set Zone I,I*8,16 To I*8+8,32
Next I
Set Line %1111111111111111
Ink 1 : Draw 150,25 To 240,25
Set Line SL
Ink 3 : Draw 150,25 To 240,25
BOV:
Repeat
MZ=Mouse Zone
Until Mouse Key=1 and MZ>0
If MZ>1 and MZ<17
Bchg 16-MZ,SL
Goto BEL
End If
If MZ=35 Then Fade 1 : Wait 15 : NEWMEN : ZSET : Ink C : Pop Proc
End Proc
Procedure XY
Z=$FFF
Fade 1,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z
Wait 15 : Cls 1 : Reset Zone
Paper 1 : Pen 0
Locate 0,1 : Print " X / Y SCREEN CO'ORDINATES :"
Paste Bob 270,4,5 : Set Zone 1,270,4 To 270+32,4+16
Fade 1 To 2 : Wait Vbl
RDRAW:
Ink 0
Repeat
Screen 0
MZ=Mouse Zone
MS=Mouse Screen
X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
F=Point(X,Y)
If MS=0 Then Screen 1 : Locate 4,3 : Print "X:";X;" Y:";Y;" COLOUR:";F;" "
If MS=1 Then Screen 1 : Locate 4,3 : Print "MOVE POINTER ONTO SCREEN."
Until Mouse Key=1
Screen 1
MZ=Mouse Zone
If MZ=1 Then Fade 1 : Wait 15 : NEWMEN : ZSET : Ink C : Pop Proc
Goto RDRAW
End Proc
Procedure BRUSHED
Reserve Zone 40
Z=$FFF : Fade 1,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z : Wait 15
Cls 1 : Reset Zone : Paper 1 : Pen 0
Locate 0,1 : Print " BRUSH"
Locate 0,2 : Print " GRABBER"
Paste Bob 230,20,5
Set Zone 20,230,20 To 262,20+16
For I=3 To 5 : Ink 0
Box I*32,3 To(I*32)+32,35
Set Zone I-2,I*32,3 To(I*32)+32,35
Next I
Fade 1 To 2 : Wait Vbl
RDRAW:
Show On
For I=3 To 5
Ink 1 : Box(I*32),3-2 To(I*32)+32,35+2
No Mask 6+I
Paste Bob I*32,3,6+I
If I-2=CURBRUSH
Ink 0 : Box(I*32),3-2 To(I*32)+32,35+2
End If
Next I
Repeat
MZ=Mouse Zone
MS=Mouse Screen
If MS=1 and Mouse Key=2 Then Get Palette 0 : Repeat : Until Mouse Key=0 : Get Palette 2
If MS=0 : PIC=1
Screen 0 : Wait Vbl
Wait Vbl : Gr Writing 2 : Wait Vbl
Set Line %1111111111111111
Repeat
X=X Screen(X Mouse) : Y=Y Screen(Y Mouse)
MS=Mouse Screen
If PIC=1 : PIC=0
FU=Point(X,Y)
If FU=-1 : FU=0 : End If
Plot X,Y,FU
End If
Box X,Y To X+32,Y+32
Box X,Y To X+32,Y+32
Until Mouse Key=1 or MS=1
If X>319-32 : X=319-32 : End If
If Y>256-32 : Y=256-32 : End If
If X<0 : X=0 : End If
If Y<0 : Y=0 : End If
Gr Writing 1
If MS=1 : Screen 1 : Goto RDRAW : End If
If Mouse Key=1 : Get Bob CURBRUSH+8,X,Y To X+32,Y+32 : Screen 1 : Goto RDRAW : End If
End If
Until Mouse Key and MZ>0
If MZ>0 and MZ<4 and Mouse Key=1 Then CURBRUSH=MZ
If MZ=20 Then Fade 1 : Wait 15 : NEWMEN : ZSET : Ink C : Pop Proc
Goto RDRAW
End Proc
'------------------- SHADE MENU
Procedure SHFT
Z=$FFF : Fade 1,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z : Wait 15
Cls 1 : Reset Zone : Paper 1 : Pen 0
Locate 0,1 : Print " COLOUR ROTATION"
Paste Bob 280,20,5 : Set Zone 1,270,20 To 280+32,20+16
Paste Bob 8,20,12 : Paste Bob 8+32,20,12 : Paste Bob 8+64,20,12
Set Zone 3,8,20 To 8+32,20+16 : Set Zone 4,8+32,20 To 8+64,20+16
Set Zone 5,8+64,20 To 8+96,20+16
Fade 1 To 2 : Wait Vbl
STR=1
RDRAW:
Wait 3
If SP>99 Then SP=99 : STR=1
If SP<0 Then SP=0 : STR=1
If STA<0 Then STA=0
If STA>FIN-1 Then STA=FIN-1
If FIN<STA+2 Then FIN=STA+2
If FIN>NOCOLS-1 Then FIN=NOCOLS-1
If MZ<>3 Then STR=1
Locate 20,1 : Print "SPEED:";SP;" "
Locate 20,2 : Print "START:";STA;" "
Locate 20,3 : Print "FINISH:";FIN;" "
If STR=1 Then STR=0 : Goto CHUMMER
Screen 0 : Shift Up SP,STA,FIN,1 : Wait Vbl : Screen 1
CHUMMER:
Repeat
MZ=Mouse Zone
Until Mouse Key and MZ>0
If MZ=3 and Mouse Key=1 Then Inc SP
If MZ=3 and Mouse Key=2 Then Dec SP
If MZ=4 and Mouse Key=1 Then Inc STA
If MZ=4 and Mouse Key=2 Then Dec STA
If MZ=5 and Mouse Key=1 Then Inc FIN
If MZ=5 and Mouse Key=2 Then Dec FIN
If MZ=1 Then Screen 1 : Fade 1 : Wait 15 : NEWMEN : ZSET : Ink C : Pop Proc
Goto RDRAW
End Proc
Procedure RFILL
Screen Hide 1
Screen 0
CURC=STA-1 : U=1
For I=0 To 255
If DR=1 Then Inc CURC
If DR=2 and U=1 Then Inc CURC
If DR=2 and U=0 Then Dec CURC
For J=0 To 319
If Mouse Key=2 Then NEWMEN : ZSET : Ink C : Pop Proc
VX=Point(J,I)
If VX=C Then Plot J,I,CURC
Next J
If CURC=FIN-1 and DR=1 Then CURC=STA-1
If CURC=FIN-1 and U=1 Then U=0
If CURC=STA and U=0 Then U=1
Next I
NEWMEN : ZSET : Ink C : Pop Proc
End Proc
Procedure SHADER
Z=$FFF : Fade 1,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z : Wait 15
Cls 1 : Reset Zone : Paper 1 : Pen 0
Locate 0,1 : Print " COLOUR SHADES SELECTOR"
Paste Bob 230,20,5
Set Zone 1,230,20 To 262,20+16
Paste Bob 8,20,7 : Paste Bob 8+32,20,8
Set Zone 3,8,20 To 8+32,20+16 : Set Zone 4,8+32,20 To 8+64,20+16
Fade 1 To 2 : Wait Vbl
RUMP:
Screen 1
Repeat
MZ=Mouse Zone
Locate 15,3 : Print "PALETTE:";PAL;" "
Until Mouse Key=1 and MZ>0
If MZ=1 Then Fade 1 : Wait 15 : NEWMEN : ZSET : Ink C : Pop Proc
If MZ=3 Then Inc PAL
If MZ=4 Then Dec PAL
If PAL<1 Then PAL=1
If PAL>15 Then PAL=15
Screen 0
If PAL=1 Then For I=0 To NOCOLS-1 : Colour I,PAL(I) : Next I : Goto RUMP
For I=0 To NOCOLS-1
Restore PAL : Read A
Colour I,A
Next I
Goto RUMP
PAL:
2 Data $0
3 Data $0
4 Data $0
End Proc